//
//  KLAboutViewController.m
//  KISSLOCK
//
//  Created by 陈宾鹏 on 16/7/1.
//  Copyright © 2016年 陈宾鹏. All rights reserved.
//

#import "KLAboutViewController.h"
#import "KLHelp.h"
#import "Masonry.h"
#import "HemaConst.h"

@interface KLAboutViewController ()
@end

@implementation KLAboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBarHidden = NO;
    self.title = @"关于";
    //初始化导航栏
    [self naveSet];
    //初始化界面
    [self uiSet];
    self.view.backgroundColor = [UIColor whiteColor];
}

//初始化导航栏
-(void)naveSet{
    [KLHelp navSet:self doBackHandeler:^(UIButton *backButton) {
        [backButton addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
    }];
}-(void)doBack:(id)sender{
    [self.navigationController popViewControllerAnimated:YES];
}

-(void)uiSet{
    UIImageView *aboutImage = [[UIImageView alloc]init];
    aboutImage.image = [UIImage imageNamed:@"关于"];
    [self.view addSubview:aboutImage];
    [aboutImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.right.mas_equalTo(0);
        make.top.mas_equalTo(-60);
        make.bottom.mas_equalTo(-60);
    }];
    
    UILabel *editionCode = [[UILabel alloc]init];
    editionCode.text = @"版本号:V1.8.8";
    editionCode.textAlignment = NSTextAlignmentCenter;
    editionCode.font = [UIFont systemFontOfSize:20];
    editionCode.textColor = RGB_UI_COLOR(0, 139, 0);
    [aboutImage addSubview:editionCode];
    [editionCode mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-140);
        make.centerX.equalTo(aboutImage);
    }];
}

@end
